-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Translation of strings starter #5031
Draft
Felienne
wants to merge
29
commits into
main
Choose a base branch
from
translate-starter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nto translate-starter
for more information, see https://pre-commit.ci
…nto translate-starter
for more information, see https://pre-commit.ci
…nto translate-starter
for more information, see https://pre-commit.ci
…nto translate-starter
for more information, see https://pre-commit.ci
…nto translate-starter
Hi @rania74! I have made a small starter for that that translates code! I will add some more details but you can start exploring this PR. |
This PR is a starter for @rania74, so it should stay open! |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…nto translate-starter
Hi people reading along (most likely @rania74) I have made this PR a bit more extensive, now calling Google translate, and translating content inside of ASK. |
for more information, see https://pre-commit.ci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work in progress for the simplest first step in #4656, translating a plain text string from one language to the other. I will make a list of steps here that I have taken, and a list of things that remain to be done.
How does current, keyword translation work?
Translation now work by analyzing the parse tree, adding nodes that need translation (currently only keywords) and then replaces these keywords with simple string replacement. If you need more details, @boryanagoncharenko (who is also in Discord) created this and can help you out.
Steps taken in this PR
hedy/tests/test_translation_level/test_translation_level_01.py
Line 28 in 82e83c4
hedy/hedy_translation.py
Line 80 in 82e83c4
https://github.com/hedyorg/hedy/pull/5031/files#diff-a56a00929e6afb2237fa3c501e2430585ea2e1200516c2ba837243d684e8d993R236
https://github.com/hedyorg/hedy/pull/5031/files#diff-a56a00929e6afb2237fa3c501e2430585ea2e1200516c2ba837243d684e8d993R76